<template>
  <h1>
   和list2同步  测试是否跨组件
  </h1>
  <button @click="add">+1</button>{{  add }}
  <hr />
  <button @click="sub">-1</button>{{ reduce }}

  
</template>

<script setup>
import { useStore } from '../../js/pinia'
import { storeToRefs } from 'pinia'

const store = useStore()
const { add, reduce } = storeToRefs(store)
</script>

<style>

</style>